/**
 * author:Administrator
 * date:2016/1/6
 * desc:TODO
 */

'use strict';

var Model = require('../model/User.js');

let CommonDao = require('./_commonDao.js');
class TheDao extends CommonDao {
  constructor() {
    super(Model);
  }

  * findByName(name) {
    return yield this.findOne({name: name});
  }

  * findByNameAndPwd(name, pwd) {
    return yield this.findOne({name: name, pwd: pwd});
  }
}
module.exports = new TheDao();

